import axios from '@/libs/axios1';
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' };
let baseUrl = '/scientific/contentRelation';

// 分享科研关联的文件
export const getRelationFileList = (params) => {
    return axios({
        url: `${baseUrl}/page`,
        method: 'GET',
        params,
        headers: jsonHeaders
    });
};

//添加关联
export const addContentRelation = (data) => {
    return axios({
        url: `${baseUrl}`,
        method: 'POST',
        data,
        headers: jsonHeaders
    });
};

//删除关联
export const delContentRelation = (relationId) => {
    return axios({
        url: `${baseUrl}/${relationId}`,
        method: 'DELETE',
        headers: jsonHeaders
    });
};

//查询关联
export const queryContentRelation = (params) => {
    return axios({
        url: `${baseUrl}/page`,
        method: 'GET',
        params,
        headers: jsonHeaders
    });
};

//copy关联
export const copyContentRelation = (data) => {
    return axios({
        url: `${baseUrl}/copy`,
        method: 'POST',
        data,
        headers: jsonHeaders
    });
};
